package com.wfg.blog.admin.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
//构造
@AllArgsConstructor
/**返回结果集*/
public class Result {

    private boolean success;

    private int code;

    private String msg;

    private Object data;

    //成功输出
    public static Result success(Object data){
        return new Result(true,200,"success",data);
    }
    //失败输出
    public static Result fail(int code,String msg){
        return new Result(false,code,msg,null);
    }
}
